]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
VolumeStatus: change the definition of high/medium/low
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 5 Feb 2011 18:42:50 +0000 (19:42 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 6 Feb 2011 11:03:12 +0000 (12:03 +0100)
Do it the same way as gnome-settings-daemon, so that OSD does not
look "out-of-sync" with the status icon.

https://bugzilla.gnome.org/show_bug.cgi?id=641538

js/ui/status/volume.js

index 9211968f96a799c6bf910257705cd6870516c7e0..f347607488685cf03942568b0b244d15b1f1b048 100644 (file)
@@ -164,10 +164,10 @@ Indicator.prototype = {
         if (volume <= 0) {
             return 'audio-volume-muted';
         } else {
-            let v = volume / VOLUME_MAX;
-            if (v < 0.33)
+            let n = Math.floor(3 * volume / VOLUME_MAX) + 1;
+            if (n < 2)
                 return 'audio-volume-low';
-            if (v > 0.8)
+            if (n >= 3)
                 return 'audio-volume-high';
             return 'audio-volume-medium';
         }